package com.sbl;

import com.sbl.config.SpringConfiguration;
import com.sbl.service.IAccountServiceTxAllAnno;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * 使用Junit单元测试：测试我们的配置
 *      事务的控制，完全的依赖注解
 *
 *  纯注解开发 ，config包下面有相关配置
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes= SpringConfiguration.class)
public class AccountServiceTxAllAnno {

    @Autowired
    private IAccountServiceTxAllAnno as;

    @Test
    public  void testTransfer(){
        as.transfer("ccc","ddd",100f);

    }

}
